\hypertarget{class_creature}{\section{Creature Class Reference}
\label{class_creature}\index{Creature@{Creature}}
}


{\ttfamily \#include $<$creature.\-hpp$>$}



Inheritance diagram for Creature\-:
% FIG 0


Collaboration diagram for Creature\-:
% FIG 1
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_creature_a597cc3b08ee17de46c3e7ec3cf0d9b58}{Creature} ()
\item 
virtual \hyperlink{class_creature_aa991b23f4813fbdb6f875204ed49814d}{$\sim$\-Creature} ()
\item 
bool \hyperlink{class_creature_a8f413947ac73cd545a6d858d1202239a}{eat} (\hyperlink{class_consumable}{Consumable} \&con)
\item 
void \hyperlink{class_creature_ae109a8875e1906f4ffee7bf3b8ba479c}{init} (float rad, \hyperlink{structs__colour}{s\-\_\-colour} col, \hyperlink{structs__vector}{s\-\_\-vector} pos, \hyperlink{structs__vector}{s\-\_\-vector} vel)
\item 
void \hyperlink{class_creature_aee07784fade6640a4dbdc837397b6b5b}{move} ()
\item 
void \hyperlink{class_creature_a4e16b04f8a7a0fb76d1da13a671a3d2a}{paint} ()
\item 
void \hyperlink{class_creature_afa51f4f3a3ea04b1453d87888aecb1c8}{save\-Creature} (const char $\ast$filename)
\item 
void \hyperlink{class_creature_aba358468be3606b1716828e3d49ca557}{load\-Creature} (const char $\ast$filename)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_brain}{Brain} $\ast$ \hyperlink{class_creature_a411023b60a5f9d18f3210a1a658454b0}{m\-\_\-brain}
\item 
int \hyperlink{class_creature_a7ee7518a06a266abff11add056aaf320}{m\-\_\-health}
\item 
int \hyperlink{class_creature_a9ab65579877fd87167a0fa6506e0e2de}{m\-\_\-age}
\item 
int \hyperlink{class_creature_aafe79a837f21faa57036be8914dccf43}{m\-\_\-speed}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 15 of file creature.\-hpp.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_creature_a597cc3b08ee17de46c3e7ec3cf0d9b58}{\index{Creature@{Creature}!Creature@{Creature}}
\index{Creature@{Creature}!Creature@{Creature}}
\subsubsection[{Creature}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Creature\-::\-Creature} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_creature_a597cc3b08ee17de46c3e7ec3cf0d9b58}


Definition at line 17 of file creature.\-cpp.

\hypertarget{class_creature_aa991b23f4813fbdb6f875204ed49814d}{\index{Creature@{Creature}!$\sim$\-Creature@{$\sim$\-Creature}}
\index{$\sim$\-Creature@{$\sim$\-Creature}!Creature@{Creature}}
\subsubsection[{$\sim$\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Creature\-::$\sim$\-Creature} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{class_creature_aa991b23f4813fbdb6f875204ed49814d}


Definition at line 19 of file creature.\-cpp.



\subsection{Member Function Documentation}
\hypertarget{class_creature_a8f413947ac73cd545a6d858d1202239a}{\index{Creature@{Creature}!eat@{eat}}
\index{eat@{eat}!Creature@{Creature}}
\subsubsection[{eat}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Creature\-::eat} (
\begin{DoxyParamCaption}
\item[{{\bf Consumable} \&}]{con}
\end{DoxyParamCaption}
)}}\label{class_creature_a8f413947ac73cd545a6d858d1202239a}


Definition at line 21 of file creature.\-cpp.



References g\-Creature\-Max\-Health, Consumable\-::get\-Hunger\-Fill(), and m\-\_\-health.



Here is the call graph for this function\-:
% FIG 2


\hypertarget{class_creature_ae109a8875e1906f4ffee7bf3b8ba479c}{\index{Creature@{Creature}!init@{init}}
\index{init@{init}!Creature@{Creature}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf Creature\-::init} (
\begin{DoxyParamCaption}
\item[{float}]{rad, }
\item[{{\bf s\-\_\-colour}}]{col, }
\item[{{\bf s\-\_\-vector}}]{pos, }
\item[{{\bf s\-\_\-vector}}]{vel}
\end{DoxyParamCaption}
)}}\label{class_creature_ae109a8875e1906f4ffee7bf3b8ba479c}


Definition at line 29 of file creature.\-cpp.



References Object\-::get\-Colour(), Object\-::get\-Kinematic(), m\-\_\-brain, s\-\_\-kinematic\-::pos, Object\-::set\-Radius(), and s\-\_\-kinematic\-::vel.



Referenced by World\-::init().



Here is the call graph for this function\-:
% FIG 3




Here is the caller graph for this function\-:
% FIG 4


\hypertarget{class_creature_aba358468be3606b1716828e3d49ca557}{\index{Creature@{Creature}!load\-Creature@{load\-Creature}}
\index{load\-Creature@{load\-Creature}!Creature@{Creature}}
\subsubsection[{load\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf Creature\-::load\-Creature} (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{class_creature_aba358468be3606b1716828e3d49ca557}


Definition at line 67 of file creature.\-cpp.

\hypertarget{class_creature_aee07784fade6640a4dbdc837397b6b5b}{\index{Creature@{Creature}!move@{move}}
\index{move@{move}!Creature@{Creature}}
\subsubsection[{move}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf Creature\-::move} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{class_creature_aee07784fade6640a4dbdc837397b6b5b}


Reimplemented from \hyperlink{class_object_a256116a392fdfdad1b3741adf56841b2}{Object}.



Definition at line 37 of file creature.\-cpp.



References s\-\_\-colour\-::b, s\-\_\-colour\-::g, Object\-::get\-Colour(), Object\-::get\-Kinematic(), Object\-::get\-Radius(), s\-\_\-kinematic\-::pos, s\-\_\-colour\-::r, s\-\_\-kinematic\-::vel, s\-\_\-vector\-::x, and s\-\_\-vector\-::y.



Referenced by World\-::update().



Here is the call graph for this function\-:
% FIG 5




Here is the caller graph for this function\-:
% FIG 6


\hypertarget{class_creature_a4e16b04f8a7a0fb76d1da13a671a3d2a}{\index{Creature@{Creature}!paint@{paint}}
\index{paint@{paint}!Creature@{Creature}}
\subsubsection[{paint}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf Creature\-::paint} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{class_creature_a4e16b04f8a7a0fb76d1da13a671a3d2a}


Reimplemented from \hyperlink{class_object_a5b6f0909fbe13333f8ec59de3f20047f}{Object}.



Definition at line 52 of file creature.\-cpp.



References s\-\_\-colour\-::b, draw\-Circle(), s\-\_\-colour\-::g, Object\-::get\-Colour(), Object\-::get\-Kinematic(), Object\-::get\-Radius(), and s\-\_\-colour\-::r.



Referenced by World\-::paint().



Here is the call graph for this function\-:
% FIG 7




Here is the caller graph for this function\-:
% FIG 8


\hypertarget{class_creature_afa51f4f3a3ea04b1453d87888aecb1c8}{\index{Creature@{Creature}!save\-Creature@{save\-Creature}}
\index{save\-Creature@{save\-Creature}!Creature@{Creature}}
\subsubsection[{save\-Creature}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf Creature\-::save\-Creature} (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{filename}
\end{DoxyParamCaption}
)}}\label{class_creature_afa51f4f3a3ea04b1453d87888aecb1c8}


Definition at line 63 of file creature.\-cpp.



\subsection{Member Data Documentation}
\hypertarget{class_creature_a9ab65579877fd87167a0fa6506e0e2de}{\index{Creature@{Creature}!m\-\_\-age@{m\-\_\-age}}
\index{m\-\_\-age@{m\-\_\-age}!Creature@{Creature}}
\subsubsection[{m\-\_\-age}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Creature\-::m\-\_\-age}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_creature_a9ab65579877fd87167a0fa6506e0e2de}


Definition at line 30 of file creature.\-hpp.

\hypertarget{class_creature_a411023b60a5f9d18f3210a1a658454b0}{\index{Creature@{Creature}!m\-\_\-brain@{m\-\_\-brain}}
\index{m\-\_\-brain@{m\-\_\-brain}!Creature@{Creature}}
\subsubsection[{m\-\_\-brain}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Brain}$\ast$ {\bf Creature\-::m\-\_\-brain}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_creature_a411023b60a5f9d18f3210a1a658454b0}


Definition at line 28 of file creature.\-hpp.



Referenced by init().

\hypertarget{class_creature_a7ee7518a06a266abff11add056aaf320}{\index{Creature@{Creature}!m\-\_\-health@{m\-\_\-health}}
\index{m\-\_\-health@{m\-\_\-health}!Creature@{Creature}}
\subsubsection[{m\-\_\-health}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Creature\-::m\-\_\-health}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_creature_a7ee7518a06a266abff11add056aaf320}


Definition at line 29 of file creature.\-hpp.



Referenced by eat().

\hypertarget{class_creature_aafe79a837f21faa57036be8914dccf43}{\index{Creature@{Creature}!m\-\_\-speed@{m\-\_\-speed}}
\index{m\-\_\-speed@{m\-\_\-speed}!Creature@{Creature}}
\subsubsection[{m\-\_\-speed}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Creature\-::m\-\_\-speed}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{class_creature_aafe79a837f21faa57036be8914dccf43}


Definition at line 31 of file creature.\-hpp.



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{creature_8hpp}{creature.\-hpp}\item 
\hyperlink{creature_8cpp}{creature.\-cpp}\end{DoxyCompactItemize}
